package study.saas.order.service;

import study.saas.common.facade.BaseFacade;
import study.saas.common.viewmodel.ApiResultV2;
import study.saas.common.viewmodel.PageModel;
import study.saas.order.entity.Commodity;
import study.saas.order.service.model.*;



public interface CommodityFacade extends BaseFacade<Commodity> {
    /**
    获取商品名称
     */
    ApiResultV2<Commodity> get(Integer commodityId);

    /**
     * 添加商品
     */
    ApiResultV2 create(CommodityCreateDTO create);

    /**
     * 删除商品
     */


    ApiResultV2 delete(Integer commodityId);

    /**
     * 减少商品数量
     *
     */
    ApiResultV2 decrease(CommodityDecreaseDTO decrease);
    /**
     * 查询商品详情
     */

    Commodity findCommodity(String commodityName);
    /**
     * 分页查找商品
     */
    ApiResultV2<PageModel<Commodity>> list(CommodityFilterDTO filter);
}
